package com.bloveoa.zkkd.doman;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

@Table(name = "t_token_update")
@Data
@Accessors(chain = true)
@DynamicInsert
@DynamicUpdate
@Entity
@ApiModel(value = "TokenUpdateModel", description = "用户token更新记录表")
public class TokenUpdateModel implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", insertable = false, nullable = false)
    private Integer id;

    @ApiModelProperty(value = "更新的用户id或者盒子id", name = "updateId", example = "")
    @Column(name = "update_id")
    private String updateId;

    @ApiModelProperty(value = "更新的token数量", name = "tokenNum", example = "1")
    @Column(name = "token_num")
    private Integer tokenNum;

    @ApiModelProperty(value = "0盒子，1用户", name = "type", example = "0")
    @Column(name = "type")
    private Integer type;

    @ApiModelProperty(value = "数量更新的时间", name = "numUpdateTime", example = "")
    @Column(name = "num_update_time")
    private Date numUpdateTime;

}
